package com.SmileBreaker;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;

public class SelectMaxTimeView extends View {

	private SelectMaxTimeActivity activity;
	
	public SelectMaxTimeView(Context context, AttributeSet attrs) {
		super(context, attrs);
		
		activity = (SelectMaxTimeActivity)context;
	}

	@Override
	protected void onDraw(Canvas canvas) {
		canvas.translate(DisplayInfo.startPaintPoint.getX(), DisplayInfo.startPaintPoint.getY());
		canvas.scale(DisplayInfo.displayRatio, DisplayInfo.displayRatio);
		
		canvas.drawBitmap(activity.getBackground(), 0, 0, null);
		canvas.drawBitmap(activity.getBackground_buttons(), 0, 0, null);
		canvas.drawBitmap(activity.getTitleBitmap(), (int)(-70*DisplayInfo.WHOLE_RATIO), (int)(50*DisplayInfo.WHOLE_RATIO), null);
		
		activity.getBtn_time1Minute().Draw(canvas);
		activity.getBtn_time2Minute().Draw(canvas);
		activity.getBtn_time3Minute().Draw(canvas);
		activity.getBtn_time4Minute().Draw(canvas);
		activity.getBtn_time5Minute().Draw(canvas);
		
		super.onDraw(canvas);
	}
}
